print(123)

function room1()
  local move = io.read()
  if move == "south" then return room3()
  elseif move == "east" then return room2()
  else
    print("argument input")
    return room1()
  end
end
function room2()
  local move = io.read()
  if move == "south" then return room4()
  elseif move == "west" then return room1()
  else
    print("argument input")
    return room2()
  end
end
function room3()
  local move = io.read()
  if move == "north" then return room1()
  elseif move == "east" then return room4()
  else
    print("argument input")
    return room3()
  end
end
function room4()
  print("Congratulation you win")
end

room1()

  